package com.example._07servlet;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;

public class RequestApi extends HelloServlet{
    @Override
    public void doGet(HttpServletRequest request, HttpServletResponse response) throws IOException {
        System.out.println("请求URL是："+request.getRequestURI());
        System.out.println("获取请求的统一资源定位符："+request.getRequestURL());
        System.out.println("客户端的地址是："+request.getRemoteHost());
        System.out.println("请求头浏览器信息User-Agent"+request.getHeader("User-Agent"));
        System.out.println("请求的方式是："+request.getMethod());
    }

}
